feat(tasks): Sprint 1 M9 — x402 payment flow, EIP-2612 permit, receipt display#279
Closed
fanhousanbu wants to merge 2 commits intofeat/m7-guardian-tier-recoveryfrom
Closed
feat(tasks): Sprint 1 M9 — x402 payment flow, EIP-2612 permit, receipt display#279fanhousanbu wants to merge 2 commits intofeat/m7-guardian-tier-recoveryfrom
fanhousanbu wants to merge 2 commits intofeat/m7-guardian-tier-recoveryfrom
Conversation
…ipts T01: 积分余额展示 - TaskContext 新增 taskTokenBalance / loadTaskTokenBalance - Dashboard 新增 Task Reward Balance 卡片,实时读取 ERC-20 余额 T02: createTaskWithPermit - TASK_ESCROW_ABI 补充 createTaskWithPermit / ERC20 nonces / name / permit - 创建任务时优先走 EIP-2612 permit(单 tx 无需 approve) - permit 失败自动降级为 approve + createTask T06: linkReceipt 前端 - ABI 补充 linkReceipt / getTaskReceipts - TaskContext 新增 getTaskReceipts / linkReceipt - 任务详情页新增 x402 Receipts 区域:显示已绑定收据,参与方可手动 link
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
T05 — X402Client integration (lib/x402-client.ts): - postTaskWithX402: POST /tasks → 402 → sign EIP-3009 → retry → receiptId - fetchReceiptDetails: GET /receipts/:id for richer display - Graceful degradation when NEXT_PUBLIC_X402_API_URL not set T06 — Receipt display & auto-link: - create/page.tsx: x402 sign → createTaskWithPermit → auto linkReceipt (3-step) - [taskId]/page.tsx: show payer + timestamp per receipt, fetched from API - task-config.ts: add X402_API_URL, REWARD_TOKEN_NAME/VERSION, isX402Configured()
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sprint 1 MyTask M9 完整实现,含三个任务:
createTaskWithPermit— EIP-2612 单 tx 创建任务(无需单独 approve),不支持时自动降级lib/x402-client.ts— x402 EIP-3009 支付客户端:POST → 402 → sign → retry → receiptId;NEXT_PUBLIC_X402_API_URL未配置时优雅跳过Create task flow
New / changed files
lib/x402-client.tslib/contracts/task-config.tsapp/tasks/create/page.tsxapp/tasks/[taskId]/page.tsxTest plan
NEXT_PUBLIC_X402_API_URL=http://localhost:3401in.env.localforge script script/DeployLocal.s.sol --broadcastcd MyTask/packages/api-server && pnpm startnpm run dev→ create a taskNEXT_PUBLIC_X402_API_URL→ 任务仍可创建(无收据,降级模式)